#include "Subject.h"
#include "Observer.h"

// 增加
void Secretary::Attach(Observer* observer) {
    observers.push_back(observer);
}

// 减少
void Secretary::Detach(Observer* observer) {
    observers.remove(observer);
}

// 通知
void Secretary::Notify() {
    for (auto o : observers) {
        o->Update();
    }
}